/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thienphuc.patient.bo.impl;

import java.util.List;
import thienphuc.patient.bo.LoaiDichVuBO;
import thienphuc.patient.dao.LoaiDichVuDAO;
import thienphuc.patient.dao.impl.LoaiDichVuDAOImpl;
import thienphuc.patient.dto.LoaiDichVu;

/**
 *
 * @author QuocDat
 */
public class LoaiDichVuBOImpl implements LoaiDichVuBO {

    private LoaiDichVuDAO loaiDichVuDAO;

    public LoaiDichVuBOImpl() {
        this.loaiDichVuDAO = new LoaiDichVuDAOImpl(LoaiDichVu.class);
    }
    
    public List<LoaiDichVu> getAll() throws Exception {
        return this.loaiDichVuDAO.findAll();
    }

    public LoaiDichVu getById(int maLoaiDichVu) throws Exception {
        return this.loaiDichVuDAO.findById(maLoaiDichVu);
    }

    public List<LoaiDichVu> getByTenLoaiDichVu(String tenLoaiDichVu) throws Exception {
        return this.loaiDichVuDAO.findByTenLoaiDichVu(tenLoaiDichVu);
    }

    public boolean updateLoaiDichVu(LoaiDichVu loaiDichVu) throws Exception {
        return this.loaiDichVuDAO.update(loaiDichVu);
    }
    
}
